package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Objects;

@Data
@Entity
@Table(name = "t_reg_rpt_nafmii_irs")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@ExcelIgnoreUnannotated
@IdClass(RegRptNAFMIIIRS.PK.class)
public class RegRptNAFMIIIRS {
    public static class PK implements Serializable {
        private BigInteger mainId;
        private BigInteger id;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public BigInteger getId() {
            return id;
        }

        public void setId(BigInteger id) {
            this.id = id;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(id, pk.id);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, id);
        }
    }

    @Id
    @Column(name = "id")
    private BigInteger id;

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @ExcelProperty(index = 1)
    @Column(name = "fd_date")
    private Date date;

    @ExcelProperty(index = 2)
    @Column(name = "fc_organization_name")
    private String organizationName;

    @ExcelProperty(index = 3)
    @Column(name = "fc_organization_product")
    private String organizationProduct;

    @ExcelProperty(index = 4)
    @Column(name = "fc_counterparty_name")
    private String counterpartyName;

    @ExcelProperty(index = 5)
    @Column(name = "fc_counterparty_product")
    private String counterpartyProduct;

    @ExcelProperty(index = 6)
    @Column(name = "fc_counterparty_type")
    private String counterpartyType;

    @ExcelProperty(index = 7)
    @Column(name = "fc_counterparty_is_pro")
    private String isPro;

    @ExcelProperty(index = 8)
    @Column(name = "fc_fixed_interest_payer")
    private String fixedPayer;

    @ExcelProperty(index = 9)
    @Column(name = "fc_float_interest_payer")
    private String floatPayer;

    @ExcelProperty(index = 10)
    @Column(name = "ff_principal")
    private Double principal;

    @ExcelProperty(index = 11)
    @Column(name = "fc_term")
    private String term;

    @ExcelProperty(index = 12)
    @Column(name = "fd_start_date")
    private Date startDate;

    @ExcelProperty(index = 13)
    @Column(name = "fd_end_date")
    private Date endDate;

    @ExcelProperty(index = 14)
    @Column(name = "ff_fixed_rate")
    private Double fixedRate;

    @ExcelProperty(index = 15)
    @Column(name = "fc_fixed_cycle")
    private String fixedCycle;

    @ExcelProperty(index = 16)
    @Column(name = "fc_fixed_daycount")
    private String fixedDaycount;

    @ExcelProperty(index = 17)
    @Column(name = "fc_float_refcode")
    private String floatRefcode;

    @ExcelProperty(index = 18)
    @Column(name = "ff_float_interest_rate_margin")
    private Double interestRateMargin;

    @ExcelProperty(index = 19)
    @Column(name = "fc_float_cycle")
    private String floatCycle;

    @ExcelProperty(index = 20)
    @Column(name = "fc_float_reset_frequency")
    private String resetFrequency;

    @ExcelProperty(index = 21)
    @Column(name = "fc_float_daycount")
    private String floatDaycount;

    @ExcelProperty(index = 22)
    @Column(name = "fd_first_interest_payment_date")
    private Date paymentDate;

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public void setId(BigInteger id) {
        this.id = id;
    }

    public BigInteger getId() {
        return id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getOrganizationName() {
        return organizationName;
    }

    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }

    public String getOrganizationProduct() {
        return organizationProduct;
    }

    public void setOrganizationProduct(String organizationProduct) {
        this.organizationProduct = organizationProduct;
    }

    public String getCounterpartyName() {
        return counterpartyName;
    }

    public void setCounterpartyName(String counterpartyName) {
        this.counterpartyName = counterpartyName;
    }

    public String getCounterpartyProduct() {
        return counterpartyProduct;
    }

    public void setCounterpartyProduct(String counterpartyProduct) {
        this.counterpartyProduct = counterpartyProduct;
    }

    public String getCounterpartyType() {
        return counterpartyType;
    }

    public void setCounterpartyType(String counterpartyType) {
        this.counterpartyType = counterpartyType;
    }

    public String getIsPro() {
        return isPro;
    }

    public void setIsPro(String isPro) {
        this.isPro = isPro;
    }

    public String getFixedPayer() {
        return fixedPayer;
    }

    public void setFixedPayer(String fixedPayer) {
        this.fixedPayer = fixedPayer;
    }

    public String getFloatPayer() {
        return floatPayer;
    }

    public void setFloatPayer(String floatPayer) {
        this.floatPayer = floatPayer;
    }

    public Double getPrincipal() {
        return principal;
    }

    public void setPrincipal(Double principal) {
        this.principal = principal;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public Double getFixedRate() {
        return fixedRate;
    }

    public void setFixedRate(Double fixedRate) {
        this.fixedRate = fixedRate;
    }

    public String getFixedCycle() {
        return fixedCycle;
    }

    public void setFixedCycle(String fixedCycle) {
        this.fixedCycle = fixedCycle;
    }

    public String getFixedDaycount() {
        return fixedDaycount;
    }

    public void setFixedDaycount(String fixedDaycount) {
        this.fixedDaycount = fixedDaycount;
    }

    public String getFloatRefcode() {
        return floatRefcode;
    }

    public void setFloatRefcode(String floatRefcode) {
        this.floatRefcode = floatRefcode;
    }

    public Double getInterestRateMargin() {
        return interestRateMargin;
    }

    public void setInterestRateMargin(Double interestRateMargin) {
        this.interestRateMargin = interestRateMargin;
    }

    public String getFloatCycle() {
        return floatCycle;
    }

    public void setFloatCycle(String floatCycle) {
        this.floatCycle = floatCycle;
    }

    public String getResetFrequency() {
        return resetFrequency;
    }

    public void setResetFrequency(String resetFrequency) {
        this.resetFrequency = resetFrequency;
    }

    public String getFloatDaycount() {
        return floatDaycount;
    }

    public void setFloatDaycount(String floatDaycount) {
        this.floatDaycount = floatDaycount;
    }

    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }
}
